package com.peng._05weibo.mapper;

import com.peng._05weibo.pojo.entity.Comment;
import com.peng._05weibo.pojo.vo.CommentVO;
import org.apache.ibatis.annotations.Insert;

import java.util.List;

/**
 * 评论Mapper
 * @Author peng
 * @Date 2024-04-23 11:37
 */
public interface CommentMapper {
    @Insert("insert into comment(content, created, user_id, weibo_id) " +
            "values(#{content}, #{created}, #{userId}, #{weiboId})")
    int addComment(Comment comment);

    List<CommentVO> selectByWeiboId(Long id);
}
